from appium import webdriver
from time import sleep
caps = {
    "deviceName":"OPPO_R9sk",
    "automationName":"appium",
    "platformName":"Android",
    "platformVersion":"6.0",
    "appPackage":"com.meizu.flyme.flymebbs",
    "appActivity":".ui.LoadingActivity",
    "noReset":"True",
    "unicodeKeyboard":"True",
    "resetKeyboard":"True",
}

driver = webdriver.Remote("http://localhost:4723/wd/hub",caps)
sleep(10)
#论坛帖子搜索
search_box = driver.find_element_by_id("com.meizu.flyme.flymebbs:id/nx")
search_box.click()
search_box.send_keys(u"魅族16")
driver.find_element_by_id("com.meizu.flyme.flymebbs:id/o2").click()
driver.quit()